home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Memphis Amiga Group / MAG Compressors Disk 1 (1991-10)(Memphis Amiga Group).zip / MAG Compressors Disk 1 (1991-10)(Memphis Amiga Group).adf / LHArc1.3 / lharc.doc < prev    next >
Text File  |  1991-08-25  |  36KB  |  917 lines

  1. ________________________________________________________________________
  2. ------------------------------------------------------------------------
  3.  
  4.  
  5.                         LHARC        vers. 1.30
  6.  
  7.                         for the Commodore AMIGA
  8.          Compatible with version 1.13 of Lharc for MSDOS systems
  9.  
  10.  
  11.                             by Paolo Zibetti
  12.  
  13.           Fidonet 2:331/101.6
  14.           Internet/UUCP: Paolo.Zibetti@p6.f101.n331.z2.fidonet.org
  15.  
  16.  
  17.                  (assembler routines by  Paolo Toccaceli) 
  18.  
  19. ------------------------------------------------------------------------
  20.  IMPORTANT NOTICE:  This program is copyrighted by Paolo Zibetti, but can
  21.  be freely distributed, providing that the following rules are respected.
  22.  - No change is made to the program nor to the accompaning documentation
  23.  - The package is always distributed in its complete form consisting of 
  24.    (at least) the 4 files: "Lharc", "Lharc.doc", "Changes" and README.1st.
  25.  - Every form of distribution is allowed and encouraged, but no fee can 
  26.    be charged for this program exept for, possibly, the cost of magnetic 
  27.    media and/or disk duplication and shipping.
  28.  - Inclusion in PD software libraries such as Fish Disks is allowed, 
  29.    provided the fees charged for these disks are comparable with those
  30.    charged by Fred Fish.
  31.  - The program cannot be distributed in any commercial product without the 
  32.    written consent of the author.
  33.    Software developers interested in using Lharc for distributing thier
  34.    products should contact me to obtain my explicit permission (what I
  35.    generally ask in return is simply to receive a free copy of thier
  36.    products).
  37.  
  38.  By copying, distributing and/or using the program you indicate your 
  39.  acceptance of the above rules.
  40.  
  41.  Also remember that this program is supplied 'as is': the entire risk as
  42.  to the quality of the program is to the user. In no event will the author 
  43.  be liable for direct or indirect damage or loss resulting from the use
  44.  of this program.
  45. ------------------------------------------------------------------------
  46.  
  47. ________________________________________________________________________
  48. ------------------------------------------------------------------------
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  --- Introduction ---
  60.  
  61. Lharc is an archive program such as Arc and Zoo. It can store several
  62. files in one archive in a compressed form which is generally more
  63. efficent than that used by Arc and Zoo.  It also supplies all of the
  64. archive handling capabilities that an archive program should have.
  65. In particular it is able to store an entire directory tree
  66. (including empty directories) with one single command. This enables
  67. you, for example, to store an entire floppy-disk with a single
  68. command and the resulting archive is usually shorter than those
  69. prodeced by Warp or even LhWarp (see the -r switch). 
  70. Another important feature of Lharc is its ability to preserve the file
  71. attributes (see the -a switch) and filenotes (i.e. the comments that
  72. AmigaODS can associate to each file).
  73. Its only weakness is compression speed: Zoo 2.0, for example, is
  74. faster, but if compression efficency is more important for you than
  75. compression time you'll surely appreciate this progam. (anyway
  76. decompression is much faster than compression)
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  --- Before starting ---
  88.  
  89. Lharc is a 'pure' program, i.e. you can make it resident via the
  90. 'resident' Amigados command just like any other command found in the
  91. c: directory. Keeping Lharc resident will greatly facilitate users
  92. who make an heavy use of Lharc (especially those who don't have an
  93. hard disk).
  94. If you have just received Lharc, beware that some copy programs and
  95. some archivers (including the zoo archiver which is used for
  96. distribution of Lharc) don't preserve file attributes, so the 'p'
  97. flag may not be set for the Lharc executable and Amigados won't
  98. understand that Lharc is a pure program. If so, just type the
  99. following line at the CLI prompt:
  100.  
  101.  protect Lharc p add
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  --- How to use ---
  113.  
  114. Lharc is run from CLI with the following command line:
  115.  
  116.   Lharc [<switches>] <Command> <Archive> [<dest path>] [<file patterns>]
  117.  
  118. items in square brackets are optional.
  119.  
  120.  
  121.  
  122.  
  123. <Command> can be any of the following (case is not significant):
  124.  
  125.  
  126.   e,x  extract files from archive
  127.        Extracts files from archives. If you specify some file names
  128.        or patterns only those files satisfying the patterns are
  129.        extracted, otherwise all the files in the archive are
  130.        extracted.
  131.        While extracting files, Lharc checks if a file by the same
  132.        name already exsists in the destination directory and prompts 
  133.        you before overwriting the old file with the extracted one 
  134.        (unless you specified the -m switch)
  135.        By default, if the files have a path name stored in the archive, they 
  136.        are extracted with their path and needed directories
  137.        are automatically created; use the -x0 switch to ignore path names.
  138.        See below under '<dest path>' for a discussion on where the
  139.        extracted files are stored.
  140.  
  141.  
  142.   l    show archives contents
  143.        Displays the names of the files in an archive along with their
  144.        date, time, CRC, compression type, original lenght and
  145.        compressed lenght.
  146.        If the -x switch is specified file names are listed complete
  147.        with their path (if present in the archive), otherwise
  148.        only the name of the files is listed.
  149.        The 'l' command won't list the comments (filenotes) that may be
  150.        assiciated with a file: use the 'v' command to see them, too.
  151.  
  152.  
  153.   v    Same as 'l', but default is to display full pathnames: i.e.
  154.        the 'v' command is equivalent to the 'l' command with the -x switch;
  155.        on the other hand the 'l' command is equivalent to the 'v' command
  156.        with the -x0 switch. 
  157.        Moreover 'v' will also show any filenote (i.e. comment) 
  158.        associated with the files; filenotes, if present,
  159.        are listed on a separate line preceded by a colon
  160.        (i.e. in the same format used by the AmigaDOS 'list' command).
  161.  
  162.  
  163.   p    extract and print files to screen
  164.        same as 'e' and 'x', but extracted files are sent to stdout
  165.  
  166.  
  167.   t    test archive integrity
  168.        Checks CRCs and checksums to ensure that the archive is not
  169.        corrupted. Lharc will test all the files on the archive, one
  170.        after each other, printing "OK" to the right of the file names
  171.        which are OK and "WARNING: CRC check failed" to the right of 
  172.        file names that are corrupted. At the end of the test the
  173.        message "Operation successful" means that all the files tested 
  174.        were OK, while the message "Operation not totally successful"
  175.        means that some files in the archive were corrupted (so you
  176.        will know of a corrupted file even if the warning message
  177.        relating to that file has scrolled away on the screen) 
  178.  
  179.  
  180.   a    create archives or add to existing archives
  181.        Files are stored in alphabetical order, unless you change
  182.        this with the -S switch. Note however that sorting only
  183.        applies to the files beeing added in the current session,
  184.        i.e. if you add files to an existing archive containing
  185.        other files, the new files will be stored, in alphabetical
  186.        order, AT THE END of the archive: old and new files won't be
  187.        intermixed to preserve global alphabetical order.
  188.        If you try to archive a file and a file by the same name
  189.        already exists in the archive the file will not be added
  190.        and a message will be printed on the screen to inform you. 
  191.        By default only file names are stored in the archive, use the 
  192.        -x switch to store file names complete with their paths.
  193.        Also, by default file attributes are not stored, use the '-a'
  194.        switch to obtain this.
  195.  
  196.  
  197.   m    move files into archivs
  198.        Same as add, but deletes original files after archiving them
  199.  
  200.  
  201.   d    delete files from archives
  202.        You can delete from an archive a maximum of 150 files at a time,
  203.        if you find that they are too little, please let me know!  
  204.  
  205.  
  206.   u    update files in archives
  207.        Same as with the 'a' command.  However, if a file already 
  208.        exists in the archive, LHarc will check its time stamp and will
  209.        keep the newer one and ignore the older one.
  210.  
  211.  
  212.   f    freshen files in archives
  213.        Replaces a file in the archive with the newer one only if a file
  214.        with the same name already exists in the archive.
  215.        Otherwise, no action is taken.
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224. <Archive> is the name (eventually preceded by a path) of the
  225. archive you want to work on. If no extension is specified the default
  226. extension .LZH is used. 
  227. With the 'l' (or 'v'), 'e' (or 'x'), 'p', 't' and 'a' commands you can
  228. work on multiple archives by using wildcards (see 'file patterns'
  229. below for a list of accepted wildcards). For example "lharc v *.LZH"
  230. will show the contents of all the archives in the current directory,
  231. while "lharc x *.LZH *.c" will extract all the C source files
  232. contained in all the archives in the current directory.
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240. [<dest path>] 
  241. This parameter is significant only with the 'x' (or 'e') command.
  242. It tells where to put the extracted files; if not specified, extracted
  243. files will go to the current directory.
  244. Please note that this paramenter must always end with '/' or ':'
  245. otherwise it will not be recognized as such and will be considered
  246. as one of the file patterns. 
  247. If the path specified by <dest path> (or equivalently the path stored
  248. in the archive) does not already exist, you will be prompted if you
  249. want new directories to be automatically created (unless you specified
  250. the -m switch, in which case directories will be created without any
  251. prompt).
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259. [<file patterns>] rappresents an optional number of file names
  260. or file patterns. They indicate which files to
  261. extract/compress/list/delete, ecc. 
  262. Accepted wild cards are the standard AmigaDOS '#' and '?' plus the '*'
  263. which is a synonim of '#?'. Since however the asterisk is a valid
  264. caracter in AmigaDOS file names I provided the '**' sequence as an
  265. escape.  So if you want to refer to a file name containing an asterisk
  266. just double the asterisk in the file name.  
  267. Example:  '*.c' is equivalent to '#?.c' and refers to all the files
  268. ending with '.c', while 'my**file' refers to the file 'my*file'.
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277. [<switches>] rappresents an optional number of switches that are used
  278. to change the behaviour of the program.
  279. A switch is composed by  a leading '-' followed by one letter; unlike
  280. commands which are case insensitive, switches are case sensitive.
  281. An important point is that if you want to specify more than one switch,
  282. every switch must be preceded by its own dash, i.e. to activate the 'x'
  283. and 'm' switches you must enter "-x -m" and NOT "-xm". 
  284. You can store your favourite switch configuration in an environment
  285. variable (see below) so that you don't have to type them every time.
  286. All the switches that don't take a parameter can be followed by a '0' 
  287. which turns off the function, while the switch alone or the switch 
  288. followed by a '1' turns the function on: i.e. -x means "use extended
  289. file names",  while -x0 means "don't use them". So you can override
  290. the default settings or the settings you specified in the environment
  291. variable "LHARC". 
  292. Default value for every switch is off, exept for the -a switch which is
  293. on with all the commands and for the -x switch which is by default on
  294. with the 'x' 'e' 'd' 't' and 'v' commands and off with the other 
  295. commands.
  296.  
  297.  
  298. Here is a summary of the available switches:
  299.  
  300.  
  301.  
  302.   -p  (p)ause after loading        [note that this is lowercase 'p']
  303.       Causes Lharc to wait for the user to press RETURN before
  304.       executing a command. This allows floppy disk users to swap disks
  305.       after loading Lharc.
  306.  
  307.  
  308.  
  309.  
  310.   -m  no (m)essage for query
  311.       Suppresses all the queries Lharc normally issues before
  312.       overwriting existing files or before creating new directories
  313.       If you specify this switch Lharc will behave as if you choose
  314.       the default action (indicated by an uppercase letter) in
  315.       response to all the questions. This switch also disables
  316.       autoshowing of files (see 'Autoshow files' below)
  317.  
  318.  
  319.  
  320.  
  321.   -x  use e(x)tended file names
  322.       By default, LHarc stores only the file names of
  323.       files and disregards the names of the directories in which
  324.       they reside.  This switch, used with the 'a' command, tells LHarc 
  325.       to extend all file names with directory names; with the 'x' 'e' 'd'
  326.       't' and 'v' commands the -x switch is automatically turned on: use 
  327.       -x0 if you want to turn it off thus ignoring pathnames with these 
  328.       commands.
  329.  
  330.  
  331.  
  332.  
  333.   -n  no progress i(n)dicator
  334.       Suppresses the display of the number of bytes beeing processed
  335.       during compression or decompression. May be useful if you
  336.       redirect to a file the output of Lharc.
  337.       Note: this version of Lharc allows the -N switch as a synonim of -n :
  338.       but this might change in future versions, so preferibly use the
  339.       lowercase letter.
  340.  
  341.  
  342.  
  343.  
  344.   -w  set (w)ork directory
  345.       Use this switch to choose your own directory for temporary files.
  346.       The directory name must immediatly follow the letter 'w' without
  347.       any leading space, i.e. to set the 'temp' directory on your
  348.       hard-disk as the working directory you must write "-wdh0:temp".
  349.       See below "Temporary files" for a discussion on where temporary
  350.       files are stored in the absence of this switch. 
  351.  
  352.  
  353.  
  354.  
  355.   -P  set (p)riority          [note that this is uppercase 'P']
  356.       Use this switch to set the priority with which Lharc will be
  357.       executed. Priority must be in the range -5..+5  and must
  358.       immediately follow the 'P' letter without blanks in between.
  359.       By default Lharc is excuted with the same priority of
  360.       the task that invoked it; using this switch will set the new
  361.       priority immediatley after loading and will set back the priority
  362.       to the original value immediately after terminating.
  363.       If you want to do something else with your Amiga, for example
  364.       editing a letter, while Lharc is compressing a long file, I
  365.       suggest that you set Lharc's priority to one less than that of
  366.       the other program, i.e. if you started your editor with the usual
  367.       priority of zero then invoke Lharc with the '-P-1' switch to set its
  368.       priority to -1
  369.  
  370.  
  371.  
  372.  
  373.   -a  consider file (a)ttributes
  374.       Lharc can ignore file attributes (i.e. the flags
  375.       indicating protection from deletion, and so on) for maximum
  376.       compatibility with the MSDOS version: in other words it can
  377.       store files with an attribute bit pattern which is suitable for 
  378.       MSDOS machines and, during extraction, ignore the
  379.       attributes stored in the archives, setting the attributes of the
  380.       extracted files to the usual '----rwed'.
  381.       Alternatively Lharc can preserve the protection bits by storing
  382.       them in the archive and then restoring them during extraction.
  383.       In Lharc version 1.3 and higher, this switch is by default on,
  384.       i.e. file protection bits will be preserved: use -a0 to turn it of
  385.       to achieve full MSDOS compatibility.
  386.       Remember that, to effectively preserve file attributes, you must
  387.       use the same setting for this switch both during compression and 
  388.       during extraction.
  389.       Of course AmigaDOS file attributes are meaningless to MSDOS and
  390.       vice-versa; so extract files with the -a switch only if you are
  391.       sure that they contain AmigaDOS file attributes and similarly
  392.       compress files with the -a switch only if you are sure that the
  393.       archive will be unpacked only by Amigas and not by MSDOS
  394.       machines. (Anyway no harm is done if this rule is not respected:
  395.       extracted files will simply have strange attributes)
  396.  
  397.  
  398.  
  399.  
  400.   -u  convert file names to (u)ppercase
  401.       By default Lharc stores file names/paths with thier original case,
  402.       if you use this switch they will be converted to uppercase.
  403.       See below 'Compatibility' for a possible use of this switch.
  404.  
  405.  
  406.  
  407.  
  408.   -r  (r)ecursively collect files
  409.       This switch instructs Lharc to search for files matching the
  410.       specified patterns not only in the specified directories, but also
  411.       in all the subdirectories that may be found in the specified
  412.       directories. For example: 
  413.  
  414.       "Lharc -r a archive.lzh df1:source/*.c" 
  415.  
  416.       will search for files whose name ends with ".c" in "df1:source/"
  417.       and in all the subdirectories that may be contained in the
  418.       "df1:source" directory. 
  419.       Another example: 
  420.  
  421.       "Lharc -r a archive.lzh df1:*" 
  422.  
  423.       will archive the entire disk in drive df1:, including all its 
  424.       subdirectories.
  425.       Very powerfull, isn't it ?
  426.       The -r switch can optionally be followed by a 'e' (i.e. -re): this
  427.       tells Lharc to store empty dirs as well. By 'empty dir' we mean
  428.       dirs which are actually empty or dirs which contain no files 
  429.       matching the patterns specified on the command line. 
  430.       This option allows you to perfectly re-create a directory tree, but
  431.       remember that archives containing empty dirs are NOT compatible 
  432.       with MSDOS-Lharc 1.13; so, use the 'e' option only if you are sure
  433.       that the archive you are producing will be unpacked on Amiga 
  434.       machines only.
  435.       When you specify the -r switch, files are always stored with their
  436.       path name, i.e. the -r switch automatically turns on the -x switch,
  437.       too.
  438.  
  439.  
  440.  
  441.  
  442.   -S  Set (s)orting criteria          [note that this is an UPPLERCASE S]
  443.       This switch sets the sort criterium for files beeing added to
  444.       archives. The '-S' must be immediatly followed by one to four
  445.       characters, i.e. -Sxyzw  where
  446.       'x' can be any of the following:
  447.            0  Don't sort files
  448.            a  Alphabetical sort    [default]
  449.            c  Chronological sort
  450.       'y', if present, can be any of the following:
  451.            a  Ascending order      [default]
  452.            d  Descending order
  453.       'z', if present, can be any of the following:
  454.            i  Case insensitive alpha-sorting      [default]
  455.            s  Case sensitive alpha-sorting
  456.       'w', if present, can be any of the following:
  457.            l  Local sorting      [default]
  458.            g  Global sorting
  459.       The above parameters must be specified in the order given above,
  460.       for example to choose between local or global sorting you must
  461.       necessarly also specify the three preceding parameters.
  462.       The -S0 option is useful if you want to create an archive in
  463.       which files appear in a given order: the -S0 switch
  464.       tells Lharc to add files in the same order as they were
  465.       specified in the command line (or in the '-i' file).
  466.       The 'global/local sort' parameter needs some more explaination:
  467.       'global sorting' means that files will be stored in strict
  468.       alphabetical or chronological order; 'local sorting' means that
  469.       sorting will be local to each subdirectory with more 'nested' 
  470.       subdirectories pushed at the end of the archive.
  471.       As an example, look at the following lists of files: the left
  472.       coloumn is sorted with alpha-global sorting, the right one is
  473.       sorted with alpha-local sorting
  474.  
  475.  
  476.      GLOBAL SORTING                             LOCAL SORTING
  477.  
  478.      Announcement                               Announcement
  479.      README                                     README
  480.      include/common.h                           include/common.h
  481.      include/foo/abc.h                          include/global.h
  482.      include/foo/rexx/rexx.h                    include/rexxbind.h
  483.      include/foo/rexx/rexxglue.h                l/xyzzy-handler
  484.      include/global.h                           lib/ps.library
  485.      include/old/foo/abc.h                      s/.xyzzyrc
  486.      include/old/poof/xyz.h                     s/add-2-startup-sequence
  487.      include/poof/poof.h                        src/Makefile
  488.      include/poof/xyz.h                         src/foo.c
  489.      include/rexxbind.h                         src/poof.c
  490.      include/xyzzy/incl1.h                      src/xyzzy.c
  491.      include/xyzzy/incl2.h                      src/zot.c
  492.      include/xyzzy/incl3.h                      utils/help
  493.      l/xyzzy-handler                            utils/more
  494.      lib/1.3/foo.library                        include/foo/abc.h
  495.      lib/1.3/old/foo.library                    include/poof/poof.h
  496.      lib/2.0/foo.library                        include/poof/xyz.h
  497.      lib/ps.library                             include/xyzzy/incl1.h
  498.      s/.xyzzyrc                                 include/xyzzy/incl2.h
  499.      s/add-2-startup-sequence                   include/xyzzy/incl3.h
  500.      src/Makefile                               lib/1.3/foo.library
  501.      src/foo.c                                  lib/2.0/foo.library
  502.      src/old/poof.c                             src/old/poof.c
  503.      src/poof.c                                 include/foo/rexx/rexx.h
  504.      src/xyzzy.c                                include/foo/rexx/rexxglue.h
  505.      src/zot.c                                  include/old/foo/abc.h
  506.      utils/help                                 include/old/poof/xyz.h
  507.      utils/more                                 lib/1.3/old/foo.library
  508.  
  509.  
  510.       Finally some examples:
  511.          -Scd          Sort chronologically in descending order
  512.          -Sc  or -Sca  Sort chronologically in ascending order.
  513.          -S0           Don't sort at all
  514.          -Sads         Sort alphabetically in descending order (case
  515.                        sensitive)
  516.          -Saail        Sort alphabetically in ascending order; sorting
  517.                        will be case-insensitive and will be local to 
  518.                        each subdirectory; this is also the default action 
  519.                        which is taken if you don't specify this switch. 
  520.  
  521.  
  522.  
  523.  
  524.   -b  Set I/O (b)uffer size
  525.       Big I/O buffers can considerably speed up some operations of Lharc
  526.       (espacially with hard disks) however if you are low on memory you
  527.       may prefer to use small I/O buffers.
  528.       This switch lets you set the amount of memory that Lharc will use
  529.       as an I/O buffer: the number of Kbytes of memory to be used must
  530.       immediately follow the 'b' without any spaces in between, e.g. 
  531.       -b20 tells Lharc to use 20 kbytes of memory for I/O buffers.
  532.       Any number between 6 and 37 is valid, default is using 11 Kbytes:
  533.       if you are low on memory you can lower this amount, but if you have
  534.       plenty of memory I suggest that you rise it. 
  535.       I suggest that you set this switch at the value you like in the 
  536.       environment variable 'LHARC' (see below) so that you don't have 
  537.       to specify this switch every time you invoke Lharc.
  538.  
  539.  
  540.  
  541.  
  542.   -f  ignore (f)ilenotes
  543.       By default Lharc archives files complete with their comment
  544.       (filenote). If you set this switch, filenotes won't be stored in
  545.       archives and files beeing extracted won't have any filenote
  546.       even if it was present in the archive.
  547.       There is no compatibility problem, but if you are not interested
  548.       in filenotes you may set this switch to reduce the archive size
  549.       (filenotes are stored in uncompressed form, so if you have long
  550.       filenotes they can increase the size of the archive).
  551.  
  552.  
  553.  
  554.  
  555.   -d  set archive's (d)atestamp
  556.       By default archives created or updated by Lharc will have a
  557.       datestamp corresponding to the date of creation of the archive.
  558.       If you set this switch, on the contrary, archives created or
  559.       updated by Lharc will have the same date as the newest file 
  560.       contained in the archive.
  561.  
  562.  
  563.  
  564.  
  565.   -c (c)onfirm files
  566.       If this switch is set, Lharc will ask you for confirmation
  567.       before archiving or extracting a file. This allows you to
  568.       specify a large set of files through the use of wild-cards and
  569.       then select which of them to consider in an interactive way.
  570.       If you for example typed: "Lharc -c a test.lzh *.c" all the 
  571.       files ending with '.c' in the current directory will be 
  572.       presented to you with the message:
  573.  
  574.       "Archive file xxx.c?  [(Y)es, (n)o, (a)ll, n(o)ne]"
  575.  
  576.       You have four alternatives: to choose between them just type 
  577.       the letter indicated in parenthesis and press return. The '(Y)'
  578.       is printed in uppercase to remember you that this is the 
  579.       default action which is taken if you simply press return.
  580.       The meanings of the four alternatives are:
  581.  
  582.       yes:  archive the file
  583.       no :  don't archive the file
  584.       all:  archive this file and all the following files without
  585.             asking anymore for confirmation.
  586.       none: don't archive this file nor any of the following files
  587.  
  588.       This switch is ignored if the -m switch is active.
  589.  
  590.  
  591.  
  592.  
  593.   -i read (i)nput from a file
  594.      This switch tells Lharc to read the list of files to act upon from
  595.      a file. The file name must immediately follow the '-i' without any
  596.      speces in between. If the -i switch is specified alone (i.e. 
  597.      without a filename) the file list is read from stdin.
  598.      For example:
  599.  
  600.      Lharc -idf1:list a foo.LZH
  601.  
  602.      will add all the files specified in the 'df1:list' file. This file
  603.      can contain ordinary file names or file patterns to be added, each
  604.      on a separate line: a file name is assumed to be
  605.      terminated by a space or a tab, everything on the line after the
  606.      first space or tab is ignored. If a file name contains spaces, it
  607.      must be enclodsed in double quotes.
  608.      The ability to read the list of files from stdin allows the use of
  609.      Lharc in a pipe of comamnds, for example:
  610.  
  611.      list since today | Lharc -i a foo.lZH
  612.  
  613.      will archive all the files in the current directory which were
  614.      created today. (A shell that supports the '|' character is
  615.      required)
  616.      Note that you can also specify some files on the command line, if 
  617.      you want; the command:
  618.  
  619.      Lharc -idf1:list a foo.LZH hello.c bye.c
  620.  
  621.      will add the 2 files 'hello.c' and 'bye.c' plus all the files 
  622.      specified in the file named 'df1:list'.
  623.      As mentioned above, although this is of less frequent use, you can 
  624.      also use the -i switch to supply a list of files to be extracted, 
  625.      printed, listed, ecc.
  626.      Please note that, in this vesion of Lharc, the number of filenames or 
  627.      patterns that can be specified through the -i switch is limited to 
  628.      about 120: this limitation will be removed in the future.
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  --- Setting switches in an environment variable ---
  641.  
  642.    You may set any of LHarc's default switches with the environment
  643.    variable 'LHARC':
  644.    So, if you, for example, want to always set the archive's date to
  645.    that of the newest file in the archive, use the maximum allowed I/O 
  646.    buffer size and use 'dh0:mytemp/' as a working directory, you simply 
  647.    type:
  648.  
  649.    SenEnv LHARC  "-wdh0:mytemp -d -b37"
  650.  
  651.    (don't forget the quotes): now Lharc will behave as if you typed
  652.    the above switches every time you invoke it. You can insert the
  653.    setenv command in your startup-sequence so that it's automatically
  654.    executed every time you turn your computer on.
  655.    Of course, you can always override the default settings
  656.    estabilished in the enviroment variable with the command line: for
  657.    example a '-d0' in the command line will override the '-d' found 
  658.    in the above enviromnet variable.
  659.    Please note that the 'setenv' command is only available in
  660.    Workbench 1.3 and higher: if you are using older versions of the
  661.    O.S. this feature is not available.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  --- Autoshow files ---
  673.  
  674. Suppose that your archive contains an important text file that you
  675. want to be sure it will be read by the guy who unpacks the archive.
  676. The file may for example contain a copyright notice or some special
  677. instructions for unpacking.
  678. For this purpuse Amiga-Lharc introduces autoshow files: while
  679. unpacking an archive, if Lharc encounters a file whose name ends with
  680. ".TXT.DISPLAYME" (case is not significant and quotes must not be
  681. included, of course), it first extracts the file (removing the .DISPLAYME
  682. extension) and then displays in a window the text found in that file
  683. waiting for the user to press RETURN before proceeding.
  684. You can add as many autoshow files as you want, for example one at the
  685. beginning and one at the end of the archive.
  686. Autoshowing of files is disabled when the -m switch is active so that
  687. a non-interactive unpacking session is allowed.
  688. Lharc uses the standard CON: device to open a window for displaing text,
  689. so you can insert ANSI codes in your autoshow files to make your
  690. messages nicer. Lharc will adjust the size of the window according to
  691. the number of lines contained in the text file, but the maximum allowed
  692. size is that of an NTSC screen (200 pixels), so if your text is longer
  693. than 20 lines it will scroll away.
  694. Finally, please note that this feature is unique to the Amiga version of
  695. Lharc (for now...) so remember that if your archive will be unpacked on
  696. another machine (or an an Amiga using Lharc version 1.0 or lower)
  697. autoshow files will simply be extracted without displaying them on the
  698. screen; anyway your important text file will still be there for later
  699. reading by the user and no compatibility problems will arise.
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  --- Temporary files ---
  712.  
  713. While compressing files Lharc creates a temporary file called
  714. 'Lharc.TMP_XXXXXX' where XXXXXX is a hex digit representing the address
  715. of its own Task structure as returned by Exec's FindTask(NULL).  
  716. The reason for the XXXXXX part of the name is that if you run multiple
  717. copies of Lharc at the same time each copy will create its own temporary
  718. file with a different name (usefull for multiline BBSes for example).
  719. Here is how Lharc decides where to store temporary files.
  720. If you specify a path with the -w switch temporary files are stored
  721. there, otherwise if the T:  logical device is assigned they will be
  722. stored in that directory, otherwise they will go to the current
  723. directory.  
  724. If you are not using the -w switch, in order to increase compression
  725. speed, I raccomand that you assign T:  to a directory in the ram-disk.
  726. Note however that T:  is usually automatically assigned to 'ram:t' in
  727. the startup-sequence of the standard Workbench, so, unless you have
  728. modified the startup-sequence, you don't have to worry about this.
  729.  
  730.  
  731.  
  732.  
  733.  
  734.  
  735.  
  736.  
  737.  
  738.  
  739.  
  740.  
  741.  
  742.  --- Corrupted archives ---
  743.  
  744. This version al Lharc for the Amiga has the capability of automatically
  745. handle corrupted archives.
  746. A Lharc archive is made up of several compressed files each precedeed by
  747. a header containing information about file name, date, lenght,...
  748. To ensure that the archive is not corrupted the header also contains a
  749. 16 bit CRC of the file and an 8 bit checksum of the header itself.
  750. If during extraction Lharc finds a corrupted file (i.e. one whose CRC
  751. does not match with the one stored in the header) the file is extracted
  752. anyway, but a warning is printed on the screen.
  753. The worst case comes when the header of a file is corrupted: in this case
  754. the file cannot be extracted even if the file itself is not corrupted.
  755. In this case Lharc will automatically skip the corrupted entry by
  756. starting a search for the next valid entry in the archive and will
  757. print a message like "WARNING: skipping extraneous/corrupted data"
  758. The reason for which it says "extraneous/corrupted" is that an Lharc
  759. archive might happen to contain parts that Lharc cannot recognize as valid
  760. archive entries even it's not corrupted. This happens when you are
  761. extracting files from a self-extracting archive produced by the MSDOS
  762. version of Lharc, since a self-extracting archive contains 8086
  763. extraction code which the Amiga-Lharc sees as extraneous data.
  764. The only extraneous data which is passed without warnings is additional
  765. bytes at the end of an archive: since they are likely to consist of
  766. zero padding due to XMODEM transfer they are totally ignored.
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  --- Return codes ---
  780.  
  781. When Lharc finishes his work, it returns to the operating system one of
  782. 3 possible return codes:
  783.  
  784.  0  Everything was OK  (the message "Operation successful" is printed on
  785.     the screen). 
  786.  5  Lharc finished its work, but something went wrong, for example Lharc
  787.     encountred a corrupted entry in the archive, but was able to continue
  788.     extracting/testing the rest of the archive (the message "Operation not
  789.     totally succesful" is printed on the screen).
  790.  20 A fatal error occurred and Lharc was unable to continue its work (an
  791.     appropriate message exlpaining the probelm is printed on the sceen) 
  792.  
  793. Thus you can test the succes of operation in your script files by means 
  794. of the 'failat' statement and the 'if warn' test.
  795.  
  796.  
  797.  
  798.  
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  --- Bugs ---
  807.  
  808. No known known bugs remain in this version.
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  ---- Compatibility ---
  821.  
  822. This program is aimed at full compatibility with the MSDOS version
  823. 1.13 of Lharc. 
  824. A few little problems might arise from some file names that are legal
  825. under AmigaDOS, but illegal under MSDOS. As a matter of facts AmigaDOS
  826. allows a wider range of file names (almost every caracter in the ASCII
  827. set is allowed and file names can be longer than 8 characters). For
  828. the greatest convenience of Amiga users, I choose not to restrict the
  829. file name range to accomplish the MSDOS rules, but if you expect that
  830. your archives will be unpacked on an MSDOS machine you'd better
  831. rispect the MSDOS limits.
  832. Also note that, although MSODS Lharc version 1.13 CAN extract files
  833. whose names contain lowercase letters, its pattern matching functions
  834. don't work properly with lowercase file names. So if you want to
  835. extract an Amiga-created archive on an MSDOS machine by using pattern
  836. matching functions (for example to extract only some files instead of
  837. the whole archive) you have to create the archive on the Amiga with
  838. the -u switch. 
  839. Finally, to attain 100% compatibility you shuold not use the '-a' switch
  840. nor the '-re' switch ('-r' alone is, on the contrary, OK)
  841. (see above in the descriptions of these switches for more details)
  842.  
  843. Also note that the MSDOS version of Lharc has the additional
  844. capability of extracting files from archives produced by Larc (a
  845. pupular Japanise archive program): this feature will not be
  846. implemented in the Amiga version.
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  ---- Acknowledgements ---
  860.  
  861. First of all I give credit to Haruyasu Yoshizaki for devising such an
  862. efficent compression algorythm as LZHUF.
  863. Second, since the source to the MSDOS version of Lharc is scarcely
  864. portable (lots of 8086 assembler ruotines and MSDOS-dependent C
  865. functions), I had to rewrite the program from scratch. Note however
  866. that for LZHUF compression/decompression I have used as a starting
  867. point a 'C' source for an example of single file compression
  868. which I found on a BBS. Although the code has been now remanaged (and
  869. partially rewritten in assembler by Paolo Toccaceli and me) it
  870. nevertheless was invaluable to me.
  871. For sake of correctness I quote here the the header found on this
  872. source:  
  873.  
  874. /*
  875.  * LZHUF.C English version 1.0
  876.  * Based on Japanese version 29-NOV-1988
  877.  * LZSS coded by Haruhiko OKUMURA
  878.  * Adaptive Huffman Coding coded by Haruyasu YOSHIZAKI
  879.  * Edited and translated to English by Kenji RIKITAKE
  880.  */
  881.  
  882. I whish to thank the above people whose work has been of
  883. foundamental importance for this project.
  884. Thanks to Stefan Boberg for suggesting how to store filenotes in the
  885. archive structure that didn't provide space for them. 
  886. Many thanks also go to all the people who contributed with suggestions
  887. and bug reports and particularly to Luca Spada for his invaluable beta
  888. testing work.
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  --- How to contact me ---
  902.  
  903. Please send suggestions, comments and bug reports to:
  904.  
  905. Paolo Zibetti          Fidonet: 2:331/101.6
  906.                  Internet/UUCP: Paolo.Zibetti@p6.f101.n331.z2.fidonet.org
  907.  
  908. node 2:331/101 (AmnesiA) is also the official distribution node for
  909. Amiga-Lharc: you'll always find the latest version available on this
  910. board. If you are an officially listed FidoNet node you can f'request
  911. the latest version of Lharc with the magic file name AMILHARC.
  912.  
  913. Amnesia (2:331/101)  phone +39-331-263425  (v32/HST, upto 14400 bps)
  914.  
  915.  
  916.  
  917.